package com.slz3.business.module.configManagement.conZoneType.steward;

import com.slz3.business.module.configManagement.conZoneType.domain.ConZoneType;
import com.slz3.business.module.configManagement.conZoneType.domain.ConZoneTypeCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

@Component
public class ConZoneTypeResponse {

    @Resource
    private ConZoneTypeResController conZoneTypeResController;

    public  Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(ConZoneType.class).flatMap(conZoneType ->
                conZoneTypeResController.add(req, conZoneType)
        );
    }

    public  Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(ConZoneTypeCondition.class).flatMap(conZoneTypeCondition ->
                conZoneTypeResController.delete(req, conZoneTypeCondition)
        );
    }

    public  Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(ConZoneType.class).flatMap(conZoneType ->
                conZoneTypeResController.modify(req, conZoneType)
        );
    }


    public  Mono<ServerResponse> list(ServerRequest req) {
        return conZoneTypeResController.list(req);
    }

    public  Mono<ServerResponse> info(ServerRequest req) {
        return conZoneTypeResController.info(req);
    }

    public  Mono<ServerResponse> choice(ServerRequest req) {
        return conZoneTypeResController.choice(req);
    }

    public  Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(ConZoneTypeCondition.class).flatMap(conZoneTypeCondition ->
                conZoneTypeResController.auditSubmit(req, conZoneTypeCondition)
        );
    }

    public  Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(ConZoneTypeCondition.class).flatMap(conZoneTypeCondition ->
                conZoneTypeResController.audit(req, conZoneTypeCondition)
        );
    }

    public  Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(ConZoneTypeCondition.class).flatMap(conZoneTypeCondition ->
                conZoneTypeResController.auditReject(req, conZoneTypeCondition)
        );
    }

    public  Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(ConZoneTypeCondition.class).flatMap(conZoneTypeCondition ->
                conZoneTypeResController.usingEnable(req, conZoneTypeCondition)
        );
    }

    public  Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(ConZoneTypeCondition.class).flatMap(conZoneTypeCondition ->
                conZoneTypeResController.usingDisable(req, conZoneTypeCondition)
        );
    }   

}
